Optimal. Leaf size=57 \[ -\frac {c (A+i B)}{a f (-\tan (e+f x)+i)}+\frac {B c \log (\cos (e+f x))}{a f}-\frac {i B c x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ -\frac {c (A+i B)}{a f (-\tan (e+f x)+i)}+\frac {B c \log (\cos (e+f x))}{a f}-\frac {i B c x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3588
Rubi steps
\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))}{a+i a \tan (e+f x)} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(a+i a x)^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {-A-i B}{a^2 (-i+x)^2}-\frac {B}{a^2 (-i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {i B c x}{a}+\frac {B c \log (\cos (e+f x))}{a f}-\frac {(A+i B) c}{a f (i-\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.58, size = 124, normalized size = 2.18 \[ \frac {c \cos (e+f x) (A+B \tan (e+f x)) \left (\tan (e+f x) \left (-i A+B \log \left (\cos ^2(e+f x)\right )+B\right )+A-2 i B \tan ^{-1}(\tan (f x)) (\tan (e+f x)-i)-i B \log \left (\cos ^2(e+f x)\right )+i B\right )}{2 a f (\tan (e+f x)-i) (A \cos (e+f x)+B \sin (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 67, normalized size = 1.18 \[ \frac {{\left (-4 i \, B c f x e^{\left (2 i \, f x + 2 i \, e\right )} + 2 \, B c e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) + {\left (i \, A - B\right )} c\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.88, size = 130, normalized size = 2.28 \[ \frac {\frac {B c \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a} - \frac {2 \, B c \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a} + \frac {B c \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a} + \frac {3 \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 8 i \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 \, B c}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{2}}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 64, normalized size = 1.12 \[ \frac {i c B}{f a \left (\tan \left (f x +e \right )-i\right )}+\frac {c A}{f a \left (\tan \left (f x +e \right )-i\right )}-\frac {c B \ln \left (\tan \left (f x +e \right )-i\right )}{f a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.46, size = 54, normalized size = 0.95 \[ \frac {-\frac {B\,c}{a}+\frac {A\,c\,1{}\mathrm {i}}{a}}{f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}-\frac {B\,c\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )}{a\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.39, size = 116, normalized size = 2.04 \[ - \frac {2 i B c x}{a} + \frac {B c \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} + \begin {cases} - \frac {\left (- i A c + B c\right ) e^{- 2 i e} e^{- 2 i f x}}{2 a f} & \text {for}\: 2 a f e^{2 i e} \neq 0 \\x \left (\frac {2 i B c}{a} + \frac {i \left (- i A c - 2 B c e^{2 i e} + B c\right ) e^{- 2 i e}}{a}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________